//
//  ShoppingDetailedView.m
//  YiShangPin
//
//  Created by yishangpin2 on 15/3/23.
//  Copyright (c) 2015年 yishangpin2. All rights reserved.
//

#import "ShoppingDetailedView.h"
#import "AppDelegate.h"
#import "ShoppingCartViewController.h"

@implementation ShoppingDetailedView

- (void)awakeFromNib {
    
    _Label.layer.borderColor = [UIColor lightGrayColor].CGColor;
    _Label.layer.borderWidth = 1.5 ;
    
    
    //字体中间划线
    _OriginalCost.textAlignment = NSTextAlignmentCenter;
    NSString *Price = @"US$ 26.00";
    NSUInteger length = [Price length];
    
    NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:Price];
    [attri addAttribute:NSStrikethroughStyleAttributeName value:@(NSUnderlinePatternSolid | NSUnderlineStyleSingle) range:NSMakeRange(0, length)];
    [attri addAttribute:NSStrikethroughColorAttributeName value:[UIColor grayColor] range:NSMakeRange(0, length)];
    [_OriginalCost setAttributedText:attri];
    // Initialization code
}




- (IBAction)close:(id)sender {
    AppDelegate *delegate = [[UIApplication sharedApplication]delegate];
    ShoppingCartViewController *shoppingcarVC = [delegate CurrentViewController].viewControllers[0];
    [shoppingcarVC RemoveXib:self.tag];
}
@end
